<style lang="less" scoped>
@import "./index.less";
</style>
<template>
  <div class="like" :class="{liked:liked,waring:waring,[size]:size}" @click="likeClick">
    <v-icon class="like-icon" type="triangle-up" />
    <span class="like-num">{{ number }}</span>
  </div>
</template>
<script>
import Icon from '~/components/icon'
export default {
  components: {
    'v-icon': Icon
  },
  props: {
    liked: {
      type: Boolean,
      default: false
    },
    number: {
      type: Number,
      default: 0
    },
    type: {
      type: String,
      default: 'primary'
    },
    waring: {
      type: Boolean,
      default: false
    },
    // small primary
    size: {
      type: String,
      default: 'primary'
    }
  },
  data () {
    return {}
  },
  created () {
    // console.log(this.$store.state)
  },
  methods: {
    likeClick () {
      this.$emit('click', this.number)
    }
  }
}
</script>
